package anli;

import java.util.Objects;

public class Student {
    private String stuNo;
    private String name;

    public Student() {
    }

    public Student(String stuNo, String name) {
        this.stuNo = stuNo;
        this.name = name;
    }

    public String getStuNo() {
        return stuNo;
    }

    public Student setStuNo(String stuNo) {
        this.stuNo = stuNo;
        return this;
    }

    public String getName() {
        return name;
    }

    public Student setName(String name) {
        this.name = name;
        return this;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(stuNo, student.stuNo);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stuNo);
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuNo='" + stuNo + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
